package com.nbsaas.boot.data.rest.resource;

import com.nbsaas.boot.data.api.apis.QuerySnippetParamApi;
import com.nbsaas.boot.data.data.entity.QuerySnippetParam;
import com.nbsaas.boot.data.api.domain.request.QuerySnippetParamRequest;
import com.nbsaas.boot.data.api.domain.response.QuerySnippetParamResponse;
import com.nbsaas.boot.data.api.domain.simple.QuerySnippetParamSimple;
import com.nbsaas.boot.data.rest.convert.QuerySnippetParamSimpleConvert;
import com.nbsaas.boot.data.rest.convert.QuerySnippetParamEntityConvert;
import com.nbsaas.boot.data.rest.convert.QuerySnippetParamResponseConvert;
import com.nbsaas.boot.data.data.repository.QuerySnippetParamRepository;

import java.io.Serializable;
import com.nbsaas.boot.jpa.data.core.BaseResource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import org.springframework.data.jpa.repository.support.JpaRepositoryImplementation;

import java.util.function.Function;
/**
*   -业务接口实现
*/
@Transactional
@Service
public class QuerySnippetParamResource extends BaseResource<QuerySnippetParam,QuerySnippetParamResponse, QuerySnippetParamSimple, QuerySnippetParamRequest>  implements QuerySnippetParamApi {

    @Resource
    private QuerySnippetParamRepository querySnippetParamRepository;

    @Override
    public JpaRepositoryImplementation<QuerySnippetParam, Serializable> getJpaRepository() {
        return querySnippetParamRepository;
    }

    @Override
    public Function<QuerySnippetParam, QuerySnippetParamSimple> getConvertSimple() {
        return new QuerySnippetParamSimpleConvert();
    }

    @Override
    public Function<QuerySnippetParamRequest, QuerySnippetParam> getConvertForm() {
        return new QuerySnippetParamEntityConvert();
    }

    @Override
    public Function<QuerySnippetParam, QuerySnippetParamResponse> getConvertResponse() {
        return new QuerySnippetParamResponseConvert();
    }




}


